package com.ruirenyun.util.annotation.validator;

import com.ruirenyun.entity.constant.SYS;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author Deng Ye
 * @version 1.0
 * @description
 * @date 2021/3/15 15:22
 */
@Documented
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = IdCardNumberValidator.class)
public @interface IdCardNumber {
    String message() default "身份证格式错误";

    SYS err() default SYS.VAL10001;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
